package com.moreemrecife.security;
import javax.ejb.Remote;

import com.moreemrecife.dto.FunctionTO;
import com.moreemrecife.dto.UserTO;

/**
 * Interface para controle de Acesso ao Sistema.
 */
@Remote
public interface AccessControl {

	/**
	 * Retrieve user data, identified by its id.
	 * @param login System id
	 * @return User profile
	 */
	public UserTO retrieveUserInfo(String login);
	
	/**
	 * Validate user and password access into the system. 
	 * @param login User id
	 * @param password User password
	 * @return true in the case the user has access to the system.
	 */
	public boolean validateAccess(String login, String password);
	
	/**
	 * Save a function in the system.
	 * @param to Function Profile
	 * @return Database Id of the function.
	 */
	public int saveFunction(FunctionTO to); 
	
	/**
	 * Just a test.
	 * @return
	 */
	public int testCall();
}
